#ifndef _MOVEACTION_
#define _MOVEACTION_

#include "BaseAction.hpp"
#include "SFML/Graphics.hpp"
#include "Utilities/StringHelper.hpp"
#include "Content/Map.hpp"
#include <vector>

class MoveAction:public BaseAction{
private:
    struct TileChanged{
        int tile;
        int layer;
        int val;
        int original;
    };

    Map* target;
     sf::Rect<int> source;
     sf::Rect<int> destination;
     bool performed;
     vector<TileChanged> tiles;

public:
    MoveAction(Map* map, sf::Rect<int> src, sf::Rect<int> dest);
    virtual void perform();
    virtual void undo();
    ~MoveAction();
};

#endif